package com.wjk.kylin.mall.auth.feign;

import com.wjk.kylin.mall.auth.feign.fallback.MemberFeignServiceFallbackFactory;
import com.wjk.kylin.mall.common.core.bo.member.MemberUserNameBO;
import com.wjk.kylin.mall.common.core.dto.base.DataOutDTO;
import com.wjk.kylin.mall.common.core.dto.member.MemberUserNameInDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * fallback 和 fallbackFactory 二选一
 *
 */
@FeignClient(value = "mall-member",
        fallbackFactory = MemberFeignServiceFallbackFactory.class
)
public interface MemberFeignService {
    /**
     * 测试feign远程调用，与远程的RequestMapping地址和方法名一致
     *
     * @return
     */
    @GetMapping("/member/member/loadUserByUsername")
    DataOutDTO<MemberUserNameBO> loadUserByUsername(@RequestBody MemberUserNameInDTO inDTO);
}
